<template>
	<view class="body">
		<view style="height: 20rpx;"></view>
		
		<view class="txhead">
			<view class="txheadin">
				<view class="txhead_1"> 累计收益(元) </view>
				<view class="txhead_2"> <text>¥</text> {{all}}  </view>
			</view>
			
			<view class="txheadin" @tap="gotixian">
				<view class="txhead_1"> 可提现(元) </view>
				<view class="txhead_2"> <text>¥</text> {{now}}  </view>
			</view>
		</view>
		
	
		
		<view class="logsbox"  v-if="lists.length>0">
			
			<view class="logli" v-for="item in lists">
				<view style="height: 10rpx;"></view>
				<view class="logt">
					<view class="logt1">{{item.payorder}}</view>
					<view class="logt2">+{{item.pmoney}}</view>
				</view>
				<view class="logb" >
					<view class="logb1">{{item.times}} </view>
					<view class="log2">{{item.dname}}</view>
				</view>
			</view>			
		</view>
		
		
		
		<view class="nolist" v-if="lists.length<1">
			<image src="/static/image/nolist.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	
	import {curl} from 'common/api.js';
	import {baseUrl} from "common/config.js";
	
	
	export default {
		data() {
			return {
				lists:[],
				all:'0',
				now:'0'
				
			}
		},
		onLoad() {
			this.getmydownorder();
		},
		onShow() {
			
			// 查看是否已经申请过了 
			var that=this;
			curl('daili/getmymoney', {}).then((res) => {
			
				that.all=res.data.all
				that.now=res.data.now
				
			});
		},
		
		methods: {
			gotixian(){
				uni.navigateTo({
					url:"/pages/down/tixian"
				})
			},
			getmydownorder(){
				var that=this;
				curl('daili/getmydownorder', {}).then((res) => {
					
					console.log(res.data)
					that.lists=res.data
				});
			}
			
			
		}
	}
</script>

<style>
	.txhead_2>text{
		font-size: 24rpx;margin-right: 5rpx;
	}
	.txhead_2{
		width: 240rpx;height: 70rpx;margin: auto;
		color: #ffffff;font-size: 44rpx;line-height: 60rpx;font-weight: bold;
	}
	.txhead_1{
		width: 240rpx;height: 100rpx;margin: auto;
		color: #ffffff;font-size: 24rpx;line-height: 140rpx;
	}
	.txheadin{
		width: 240rpx;
		text-align: center;
	}
	.txhead{
		width: 100%;height: 200rpx;
		background: #08b059;
		display: flex;align-items:center;justify-content: center;
	}
	
	
	.log2{
		width: auto;height: 40rpx;
		padding: 0px 14rpx;font-size: 24rpx;line-height: 40rpx;
		background: #e9f9ec;color: #08b059;border-radius: 5rpx;
	}
	.logb1{
		font-size: 28rpx;color: #666666;
	}
	
	.logt1,.logt2{
		font-size: 30rpx;font-weight: bold;
		color: #333333;
	}
	.logb{
		width: 650rpx;height: 50rpx;
		display: flex;align-items: center;justify-content: space-between;
	}
	.logt{
		width: 650rpx;height: 70rpx;
		display: flex;align-items: center;justify-content: space-between;
	}
	.logli:last-child{
		border-bottom: none;
	}
	.logli{
		width: 650rpx;height: 140rpx;margin: auto;
		border-bottom: 1px solid #ececec;
	}
	.logsbox{
		width: 700rpx;height: auto;margin:15rpx auto;
		background: #ffffff;border-radius: 10rpx;
	}
	.body{
		width: 100%;min-height: 100vh;
		background: #fafafa;
	}
</style>
